package com.pompom.matchcrawler;

import gummy.database.access.TOConnectionSettings;
import gummy.xml.to.XmlTO;

import java.io.InputStream;

import com.pompom.matchcrawler.types.TOWorker;

public class WorkerInitializer {
	TOWorker[] workers;
	
	
	public TOWorker[] getWorkers()
	{
		return workers;
	}
	
	public void loadJobs(InputStream filePath) {
		try {
			 workers = (TOWorker[])XmlTO.go(filePath);
			for (int i = 0; i < workers.length; i++) {
				 System.out.println(""+workers[i].workerKey);
			}
		} catch(Exception e) {
			throw new RuntimeException(e);
		}
	}
}
